package com.lanou;

import serices.siriver;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created by zhaoce on 18/1/5.
 */
@WebServlet("/test")
public class lanou extends HttpServlet{

    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

         String acc=req.getParameter("acc");
         String pwd=req.getParameter("pwd");
         String accc=req.getParameter("accc");


         switch (accc){

             case "1":
               siriver ai=new siriver();
               if (ai.denglv(acc,pwd)){


                 req.getSession().setAttribute("name",acc);
                 req.getRequestDispatcher("Success.jsp").forward(req,resp);

             }else{
                   req.getRequestDispatcher("index.jsp").forward(req,resp);


             }


                 break;
             case "2":



                 break;



         }












    }



}
